package cn.wolfcode.wolf2w.elasticsearch.service.impl;

import cn.wolfcode.wolf2w.elasticsearch.domain.TravelEs;
import cn.wolfcode.wolf2w.elasticsearch.repository.TravelEsRepository;
import cn.wolfcode.wolf2w.elasticsearch.service.ITravelEsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TravelEsServiceImpl implements ITravelEsService {

    @Autowired
    private TravelEsRepository travelEsRepository;
    @Autowired
    private MongoTemplate template;

    @Override
    public void save(TravelEs travelEs) {
        travelEsRepository.save(travelEs);
    }

//    @Override
//    public void delete(String id) {
//        travelEsRepository.deleteById(id);
//    }
//
//    @Override
//    public void update(TravelEs travelEs) {
//        travelEsRepository.save(travelEs);
//    }
//
//    @Override
//    public TravelEs get(String id) {
//        return travelEsRepository.findById(id).orElse(null);
//    }
//
//    @Override
//    public List<TravelEs> list() {
//        return travelEsRepository.findAll();
//    }
}
